package com.bootdo.system.dao;

import com.bootdo.system.domain.UserDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2017-10-03 09:45:11
 */
@Mapper
public interface UserDao {
	List<UserDO> getDoc(@Param("roleId") Long roleId, @Param("depId") Long depId);

	UserDO getByName(@Param("name") String name);

	UserDO get(Long userId);
	
	List<UserDO> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(UserDO user);
	
	int update(UserDO user);
	
	int remove(Long userId);
	
	int batchRemove(Long[] userIds);
	
	Long[] listAllDept();

	// 判断用户名是否存在
	int countUserName(@Param("userName") String userName);
	// 判断手机号是否存在
	int countMobile(@Param("mobile") String mobile);
}
